 <style>
     .ttl{width:70px;text-align:right;}
     .pop_cont_input{width:100%;}
     .pop_cont_input ul {width:100%;}
     .pop_cont_input ul li {width:25%;float:left;height:35px;}
     .pop_cont_input{line-height:30px;}
     .pop_cont_input input{pading:0px 5px;}
     .pop_cont_input select{height:28px;}
     .pop_cont .pop_cont_input li{margin: 0px 0px;}
     .pop_cont .pop_cont_input li .textbox{border:1px #d2d2d2 solid; width:120px; display:inline-block;}

     .pop_cont {
         background: white;
         min-width: 300px;
         height: auto;
         overflow: hidden;
         position: absolute;
         top: 2%;
         left: 50%;
         margin-left: -48%;
         border-radius: 5px 5px 0 0;
     }
     .pop_cont .btm_btn {padding:0px 0px;}
     .blank{width:100%;height:10px;overflow:hidden;}
.bixuan{color:red;}
 </style>
 <!--引入JS-->
<script type="text/javascript" src="/static/admin/js/ajaxfileupload.js?t=1"></script>
 <link rel="stylesheet" type="text/css" href="/static/My97DatePicker/skin/WdatePicker.css" />
<script charset="utf-8" src="/static/My97DatePicker/WdatePicker.js"></script>
 <div class="pop_cont" style="width:96%;">
 <input type="hidden" value="<?php echo $id; ?>" id="editId" />
       <!--title-->
       <h3><?php echo $title;?><span class="falseBtn" style="color:red;float:right;font-size:18px;cursor:pointer;">X</span></h3>
       <!--content-->
        <form autocomplete="off" action="#" id="myform">
         </form>
       <div class="pop_cont_input">
        <ul>
         <li>
          <span class="ttl">登录账号</span>
          <?php echo $info['uname'];?>
         </li>
         <li>
          <span class="ttl"><font class="bixuan">*</font>姓名</span>
          <input type="text" name="e-nickname" id="e-nickname" value="<?php echo $info['nickname'];?>" placeholder="姓名" class="textbox" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;"  />
          
         </li>
         
          <li>
          <span class="ttl"><font class="bixuan">*</font>部门</span>
           <select name="e-firstDep" id="e-firstDep" class="select firstDept" style="width:80px;">
	       <option value="">--选择--</option>
	       <?php
	       
	       foreach($FirstDepList as $key=>$val)
	   		{
	   		?>
	        <option value="<?php echo $val['id']; ?>" <?php if($val['id']==$info['first_depid']){ echo 'selected';} ?> ><?php echo $val['depname'] ?></option>
		   <?php
	       }
       		?>
          </select>
          
         </li>
        
         <li>
          <!--<span class="ttl"><font class="bixuan">*</font>角色</span>
           <select name="e-group" id="e-group" class="select">
	       <option value="">--选择--</option>
	       <?php
	       foreach($groupList as $key=>$val)
	   		{
	   		?>
	        <option value="<?php echo $val['id']; ?>" <?php if($val['id']==$info['group']){ echo 'selected';} ?> ><?php echo $val['gname'] ?></option>
		   <?php
	       }
       		?>
      </select>-->
         </li>
         
          <li>
          <span class="ttl"><font class="bixuan">*</font>性别</span>
            <select name="e-sex" id="e-sex" class="select">
             <option value="1" <?php if($info['sex']=='1'){echo 'selected';} ?>>男</option>
             <option value="0" <?php if($info['sex']=='0'){echo 'selected';} ?>>女</option>
            </select>
         </li>
        
         <li>
          <span class="ttl">出生年月</span>
          <input name="e-bday"  id="e-bday" class="Wdate textbox" placeholder="出生年月"  onfocus="WdatePicker({lang:'zh-cn'})" value="<?php echo $info['bday'];?>" size="12"  type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;" >
         </li>
            <li>
                <span class="ttl">身高</span>
                <input name="e-height"  id="e-height"  placeholder="身高" value="<?php echo $info['height']; ?>" size="12"  type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;" >
            </li>

            <li>
                <span class="ttl">体重</span>
                <input name="e-weight"  id="e-weight"  placeholder="体重"  value="<?php echo $info['weight']; ?>" size="12"  type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;" >
            </li>

            <li>
                <span class="ttl">支付宝姓名</span>
                <input name="e-alipay_name"  id="e-alipay_name"  placeholder="支付宝账号姓名"  value="<?php echo $info['alipay_name']; ?>" size="12"  type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;" >
            </li>
            <li>
                <span class="ttl">支付宝账号</span>
                <input name="e-alipay_account"  id="e-alipay_account"  placeholder="支付宝账号"  value="<?php echo $info['alipay_account']; ?>" size="12"  type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;" >
            </li>
          <li>
          <span class="ttl">身份证号</span>
          <input type="text" name="e-cid" id="e-cid" value="<?php echo $info['cid'];?>" placeholder="身份证号" class="textbox" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;"  autocomplete="off" />
         </li>
         <li>
          <span class="ttl"><font class="bixuan"></font>联系电话</span>
          <input type="text" name="e-phone" id="e-phone" value="<?php echo $info['phone'];?>" placeholder="联系电话" class="textbox" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;width:120px;"  />
          
         </li>

            <li>
                <span class="ttl"><font class="bixuan"></font>VIP</span>
                <select name="e-vip" id="e-vip" class="select">
                    <option value="1" <?php if($info['vip']){echo 'selected';} ?>>是</option>
                    <option value="0" <?php if(empty($info['vip'])){echo 'selected';} ?>>否</option>
                </select>
            </li>
       
          <li style="width:100%;height:100px;">
          <span class="ttl">照片</span>
        <form id="jvForm" action="/api/face/updateImage1" style="display:inline-block;" method="post" enctype="multipart/form-data">
            <input type="hidden" name="e-mpic" id="e-mpic" value="<?php echo $info['head'] ?>" />
                <a style="position:relative;display:block;width:100px;height:30px;background:#EEE;border:1px solid #999;text-align:center;line-height:30px;"  href="javascript:void(0);" >上传文件
                <input style="position:absolute;left:0;top:0;width:100px;height:30px;z-index:999;opacity:0;" onchange="uploadPic()" type="file" name="file" id="file"  />
                </a>
            <div id="updateimg">
            <?php
            if($info['head'])
			{
			?>
            <a href="<?php echo $info['head']; ?>" target="_blank"><img src="<?php echo $info['head']; ?>" style="width:60px;margin:5px;" /></a>
            <?php
            }
			else
			{
				
			}
			?>
            </div>
            </form>
         </li>
         
         <li style="width:100%;">
          <div class="btm_btn">
        <input type="button" value="确认" class="input_btn trueBtn"/>
        <input type="button" value="关闭" class="input_btn falseBtn"/>
       </div>
         </li>
         
        </ul>

       </div>
     <div class="blank"></div>
       <!--bottom:operate->button-->
      
      </div>
      
      <script>
      function uploadPic()
      {
   	
   		 $.ajaxFileUpload(
   		   {
	    		   	url: '/api/face/uploadImage1', //用于文件上传的服务器端请求地址
	    		   	secureuri: false, //是否需要安全协议，一般设置为false
	    		   	fileElementId: 'file', //文件上传域的ID
	    		   	dataType: 'text/plain', //返回值类型 一般设置为json
	    		   	success: function (data, status) //服务器成功响应处理函数
	    		   	{
	    		   
	    		   	 if(data.err==0)
	                   {
	                	   var img='<a href="'+data.data.pic+'" target="_blank"><img src="'+data.data.pic+'" style="width:120px;margin:5px;" /></a>';
	                   $("#updateimg").html(img);
	                   $("#e-mpic").val(data.data.pic);
	                   }
	    		   },
	    		   error: function (data, status, e)//服务器响应失败处理函数
	    		   {
	    		   	alert(e);
	    		   }
   		   }
   		 )
   		   return false;
   		   
      }
      $(function(){
     	 
	       $(".trueBtn").unbind().bind("click",function(){
			 
	    	var that =this;
   		    var url="/admin/user/editData";
   		    var id=$("#editId").val();
   		    var first_depid=$("#e-firstDep").val();
          //var group=$("#e-group").val();
          var nickname=$("#e-nickname").val();
         
      
          var sex=$("#e-sex").val();
          var bday=$("#e-bday").val();
          var cid=$("#e-cid").val();
          var phone=$("#e-phone").val();
          var vip=$("#e-vip").val();

          var head=$("#e-mpic").val();

               var height=$("#e-height").val();
               var weight=$("#e-weight").val();
               var alipay_name=$("#e-alipay_name").val();
               var alipay_account=$("#e-alipay_account").val();
		     if(first_depid=="")
       {
        ErrTiShi("请选择部门");return false;
       }
       // if(group=="")
       //   {
       //  ErrTiShi("请选择角色");return false;
       //   }
      if(nickname=="")
       {
          ErrTiShi("请输入用户姓名");return false;
       }
       
      
      var nicknameLen = nickname.length;
     if(nicknameLen<2 || nicknameLen >8)
     {
      ErrTiShi("姓名长度不正确，请输入2-8位长度的字符串");return false;
     }
       
    if(sex=="")
    {
          ErrTiShi("请选择性别");return false;
    }

var param={
    id:id,
    nickname:nickname,
    // group:group,
    first_depid:first_depid,
    phone:phone,
    head:head,
    sex:sex,
    cid:cid,
    bday:bday,
    height:height,
    weight:weight,
    alipay_name:alipay_name,
    alipay_account:alipay_account,
    vip:vip,
    sys_opt:'editData'//后台判断编辑操作
};
			 AjaxRequest(url,param,function(data){
  			   if(data.err==0)
  			   {
  				   SuccessTiShi("操作成功");
  				   $(".pop_bg").fadeOut();
  				   $(".pop_bg").html('');
  				   myResearch();
  			   }
  			   else
  			   {
  				   ErrTiShi("操作失败");
  			   }
  		   	});
			 
		  });
		   //弹出：取消或关闭按钮
		   $(".falseBtn").unbind().bind("click",function(){
		
			 $(".pop_bg").fadeOut();
		   });
		   

			  
 	});
      </script>